package com.ship.mapper;

import com.ship.dto.UserDto;
import com.ship.dto.UserSearchDto;
import com.ship.model.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


/**
* @author Lucky Boy
* @description 针对表【user】的数据库操作Mapper
* @createDate 2024-07-01 15:59:15
* @Entity com.ship.model.User
*/
@Mapper
public interface UserMapper {


    List<User> selectUsersByPage();


    int insertUser(UserDto userDto);

    int selectUserExists(UserDto userDto);

    int deleteById(Long id);

    int deleteInIds(String id);

    int updateUser(UserDto userDto);

    int selectUserById(Long id);

    List<User> selectUsersBySearch(UserSearchDto userSearchDto);

    int updateUserShip_idNull(Integer id);

    List<User> selectUsersByShipId(Long id);

    Long[] selectUserCountsOrderByShip_id();

    int updateUserDept_idNull(Long deptId);

    //查询所有用户的船号和部门号
    List<User> selectUsersShipAndDept();
}
